public class Solution {
    public static int[] twoSum(int[] nums, int target) {

        for (int i = 0; i < nums.length-1; i++) {
            int num1 = nums[i];
            for (int j = i+1; j < nums.length; j++) {
                int num2 = nums[j];
                if(num1+num2 == target){
                    System.out.println('['+i+',' + j + ']');
                }
            }
        }

        return null;
    }

    public static void main(String[] args) {
        int[] nums = new int[]{2, 7, 11, 15};
        twoSum(nums,9);
    }
}
